<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:TableTopWidgets">
    
    <Style TargetType="{x:Type local:RNTControl}">
            <Setter Property="BorderBrush" Value="#FF5C5C5C"/>
        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
        <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:RNTControl}">
                    <Border x:Name="PART_Border" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="5" BorderThickness="20">
                        <Grid x:Name="PART_MainGrid" Background="{TemplateBinding Background}">
                            <TextBlock x:Name="PART_Title" Height="30" Margin="0" TextWrapping="Wrap" Text="{TemplateBinding Title}" VerticalAlignment="Top" Background="#FFBCBBBB"/>
                            <AdornerDecorator>
                                <ContentPresenter x:Name="PART_Content" Margin="0,30,0,0"/>
                            </AdornerDecorator>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type local:RadialButton}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:RadialButton}">
                        <Grid Background="{x:Null}" Width="{Binding Path=_width, RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=_height, RelativeSource={RelativeSource TemplatedParent}}">
                            <Path     Opacity="{Binding Path=Opacity, RelativeSource={RelativeSource TemplatedParent}}"
                                      Fill="{Binding Path=Background, RelativeSource={RelativeSource TemplatedParent}}" 
                                      Data="{Binding Path=_borderGeometry, RelativeSource={RelativeSource TemplatedParent}}"
                                      StrokeThickness="{Binding Path=Thickness, RelativeSource={RelativeSource TemplatedParent}}"
                                      x:Name="myPath">
                                <Path.Stroke>
                                    <SolidColorBrush Color="Gray"/>
                                </Path.Stroke>
                            </Path>
                            <ContentPresenter Margin="{Binding Path=TextMargin, RelativeSource={RelativeSource TemplatedParent}}" Name="Content" HorizontalAlignment="Center"/>
                        </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="local:BorderMenu">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:BorderMenu">
                    <Border
                      Background="{TemplateBinding Background}"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="{TemplateBinding BorderThickness}">
                        <ContentControl Content="{TemplateBinding Content}"
                                            HorizontalAlignment="Stretch" 
                                            VerticalAlignment="Stretch" 
                                            HorizontalContentAlignment="Stretch" 
                                            VerticalContentAlignment="Stretch"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
